package process

import (
	"ferry/apis/process"
	"ferry/middleware"
	jwt "ferry/pkg/jwtauth"
	"github.com/gin-gonic/gin"
)

func RegisterSubjectRouter(v1 *gin.RouterGroup, authMiddleware *jwt.GinJWTMiddleware) {
	subject := v1.Group(
		"/subject").Use(authMiddleware.MiddlewareFunc()).Use(middleware.AuthCheckRole())

	{
		subject.GET("", process.SubjectList)
		subject.POST("", process.CreateSubject)
		subject.PUT("", process.UpdateSubject)
		subject.DELETE("", process.DeleteSubject)
	}

}
